<?php
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=archivo.xls");
header("Pragma: no-cache");
header("Expires: 0");
include("../phpConf/controlador.php");
if(count($aDatos) > 0)
{
?>
  <table bgcolor="#FFFFFF" border="1">
  <tr>
    <th>Nombre</th>
    <th>Apellido</th>
    <th>Profesion</th>
    <th>Mail</th>
    <th>Comentario</th>
  </tr>
    <?php foreach($aContacto as $reg): ?>
  <tr>
     <td><?php echo (strlen($reg["nombre"])>0 ? $reg["nombre"] :"<br />")?></td>
     <td><?php echo (strlen($reg["apellido"])>0 ? $reg["apellido"] :"<br />")?></td>
     <td><?php echo (strlen($reg["profesion"])>0 ? $reg["profesion"] :"<br />")?></td>
     <td><?php echo (strlen($reg["mail"])>0 ? $reg["mail"] :"<br />")?></td>
     <td><?php echo (strlen($reg["comentario"])>0 ? $reg["comentario"] :"<br />")?></td>
  </tr>  
  <?php endforeach;?>
  </table>
<?php
}
else
{
?>
<table><tr><td>No Hay Datos</td></tr></table>
<?php
}
?>